package com.jjwxc.jwjskandriod.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

public class TabAdapter extends FragmentPagerAdapter {

    private List<String> str;
    private ArrayList<Fragment> list;

    public TabAdapter(FragmentManager fm, List<String> str, ArrayList<Fragment> list) {
        super(fm);
        this.str = str;
        this.list = list;
    }

    @Override
    public Fragment getItem(int i) {
        return list.get(i);
    }

    @Override
    public int getCount() {
        return list.size();
    }
//
//    @Nullable
//    @Override
//    public CharSequence getPageTitle(int position) {
//        return str.get(position);
//    }
}


